package com.offcn.service.Impl;

import com.offcn.dao.Impl.UserDaoImpl;
import com.offcn.dao.UserDao;
import com.offcn.entity.User;
import com.offcn.service.UserService;
import com.offcn.utils.PageTool;

import java.util.List;

public class UserServiceImpl implements UserService {
    UserDao dao = new UserDaoImpl();
    @Override
    public List<User> findAllUser(PageTool page, String search) {
        return dao.findAllUser(page,search);
    }

    @Override
    public int countUser(String search) {
        return dao.countUser(search);
    }

    @Override
    public int addUser(User user) {
        return dao.addUser(user);
    }

    @Override
    public User login(User user) {
        return dao.login(user);
    }

    @Override
    public int delAll(String arr) {
        return dao.delAll(arr);
    }

    @Override
    public int updateUser(User user) {
        return dao.updateUser(user);
    }

    @Override
    public List<User> findByname(String search) {
        return dao.findByname(search);
    }

    @Override
    public User findByUid(int uid) {
        return dao.findByUid(uid);
    }

    @Override
    public User findByPhone(String phone) {
        return dao.findByPhone(phone);
    }

    @Override
    public int regist(String name, String phone, String password) {
        return dao.regist(name,phone,password);
    }
}
